package com.rulin.asp.business.datacleaning.replication;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/replication")
public class ReplicationController {

	@Autowired
	private ReplicationService replicationService;
	
	/**
	 * 一键复制题目数据到数据中心
	 * @param quesId
	 * @param major
	 * @param subject
	 * @param relatedQues
	 * @return
	 */
	@RequestMapping(value = "/copy.json", method = RequestMethod.POST)
	@ResponseBody
	public RepliResponse saveQuestion(String quesId, String major, String subject, String relatedQues) {
		RepliResponse response = replicationService.replicateQuestion(quesId, major, subject, relatedQues);
		return response;
	}
}
